<?php
error_reporting(E_ALL);
include './include/common.php';
//ignore_user_abort(true);

if(isset($_REQUEST['run']))
{
	$d = $_GET['d'];
	getcache($d['pinyin'], 'pages');
	$now = date('H',time());
	if($make7day)
	{
		if($now >8 && $now <9)
		{
			getcache($d['pinyin'], 'pages',7);
			getcache($d['pinyin'], 'pages',10);
			getcache($d['pinyin'], 'pages',15);
			getcache($d['pinyin'], 'pages',30);
		}
	}
	exit('true');
}

/**程序区**/

$tmp = $db->getone("select count(*) as c from {$table_top}area");
$count = $tmp['c'];
$sql = $db->select("select pinyin from {$table_top}area");
$sql = json_encode($sql);
?>
<html>
<script src="js/jq.js"></script>
<script>
var date = eval('date=<?php echo $sql;?>');

for(i in date)
{
	getpage('/m3.php',date[i]);		
}
function getpage(url,param)
{
	$.get(url,{'d':param,'run':true},function(){
			$('#status').html(parseInt($('#status').html())+1); 
		})
}
</script>
<body>
<div>已经生成了<i  id="status">
0
</i>条数据</div>
<div>开始时间：<i id="st"><?php echo date('h:i:s',time());?></i></div>
</body>
</html>